#!/bin/sh

if test $1 
then 
  name=$1 
else  
  name="default"
fi

if test "$name" != "default" -a "$name" != "alpha" -a "$name" != "dec" -a "$name" != "sgi" -a "$name" != "sysV" -a "$name" != "solaris" -a "$name" != "x64"
then
  echo config: Unknown type: $2.  Choose one of: default, alpha, dec, sgi, sysV, solaris, x64
else
  /bin/cp src/fasthenry/Makefile.$name src/fasthenry/Makefile
  /bin/cp src/zbuf/Makefile.$name src/zbuf/Makefile

  if test "$name" == "x64"
  then
     /bin/cp src/fasthenry/sparse/Makefile.$name src/fasthenry/sparse/Makefile
     /bin/cp src/misc/Makefile.$name src/misc/Makefile
  else
     /bin/cp src/fasthenry/sparse/Makefile.default src/fasthenry/sparse/Makefile
     /bin/cp src/misc/Makefile.default src/misc/Makefile
  fi
fi

